<?php   
  require(dirname(__FILE__).'/global.php'); 
  require(ROOT.'/admin/isLogin.php'); 
  require(ROOT.'/include/file.class.php'); 
  require(ROOT.'/include/xml.class.php');
                                    
  $xmlPath = ROOT.'/common.xml';
  $xml = new SimpleXMLUtil($xmlPath);
  $attachSize = $xml->getElementValue('AttachSize');
  
  $smarty->assign('root',iconv('gbk','utf-8',$_SERVER['DOCUMENT_ROOT']));    
  $smarty->assign('os',PHP_OS);           
  $smarty->assign('software',$_SERVER['SERVER_SOFTWARE']);
  $smarty->assign('php_version',PHP_VERSION);
  $smarty->assign('mysql_version',$db->getVersion()); 
  $smarty->assign('mysql_size',DataConverter::format($db->getMysqlSize()));
  $smarty->assign("attach_size",DataConverter::format($attachSize*1024));
  $smarty->assign("system_size",DataConverter::format(FileUtil::getDirSize(ROOT)));
  $smarty->assign('current_attach_size',DataConverter::format(FileUtil::getDirSize(ROOT.'/attachment')));
  $smarty->assign('remote_ip',$_SERVER['REMOTE_ADDR']);
    
  $smarty->display('welcome.html');
?>